<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta charset="utf-8">
	<title></title>
	<meta name="keywords" content="">
	<meta name="description" content="">
	<meta name="author" content="">
	<link href="css/daterangepicker.min.css" rel="stylesheet">
	<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
	<link href="js/um1.2.3/themes/default/css/umeditor.css?_ver=13" type="text/css" rel="stylesheet">
	<link rel="stylesheet" href="css/main.css">
	<script src="js/jquery.min.js"></script>
	<link rel="stylesheet" href="css/lcommon.css">
	<link rel="stylesheet" href="css/common.css">
	<script type="text/javascript" src="js/common.js"></script>
	<script type="text/javascript" src="js/um1.2.3/umeditor.config.js?_ver=13"></script>
	<script type="text/javascript" src="js/um1.2.3/umeditor.js?_ver=13"></script>
<!--[if lt IE 9]>
	<script src="js/html5shiv.min.js"></script>
	<script src="js/respond.min.js"></script>
<![endif]-->
<style>
	.el-button{
		line-height: 0;
	}
</style>
<meta name="renderer" content="webkit">
<link rel="shortcut icon" href="favicon.ico">
<style>
	.dateComponent{
		position: relative;
	}
	.dateComponent .dateIcon{
		position: absolute;
		right:10px;
		bottom:18px;
		width:24px;
		height:24px;
		background: url(css/images/date.png) 96% center no-repeat !important;
		background-size: 24px 24px !important;
	}
	.el-icon-date:before {
		content: "" !important;
		/* background: url(images/date.png) 96% center no-repeat !important;
		background-size: 24px 24px !important; */
	} 
	.el-date-editor.el-input, .el-date-editor.el-input__inner{
		width: 100% !important;
	}
	.el-input--prefix .el-input__inner{
		width: 100% !important;
		height: 40px !important;
		border-radius: 5px;
		padding: 0 10px;
		line-height: 38px;
		display: block;
	}
	.view{
		cursor: pointer;
	}
</style>
</head>
<body>
	<div id="app" v-cloak v-loading="loading">
		<header id="header"></header>
		<div class="header-space"></div>
		
		<section class="g-main">
			<div class="content">
				<div class="main-left">
					<section class="section-resume">
						<div class="resume-info">
							<div class="title">
								<span class="view" @click="changeView">预览简历</span>
							</div>
							<div class="box">
								<div class="left">
									<div class="name" v-if="person_info.name">{{person_info.name}}</div>
									<ul class="list">
										<li>{{getBase}}</li>
										<li class="w50" v-if="person_info.telephone">电话：{{person_info.telephone}}</li>
										<li class="w50"  v-if="person_info.email">邮箱：{{person_info.email}}</li>
										<li v-if="person_info.id_card">身份证号：{{person_info.id_card}}</li>
										<li>语言：
											<span v-for="(item,index) in person_info.language" style="margin-right:10px;">{{item.languageName}} | {{item.abilityName}}</span>
										</li>
									</ul>
									<div class="tags" v-if="person_info.person_tag && person_info.person_tag.length">
										<span class="tag tag-blue" v-for="(item,index) in person_info.person_tag" v-if="item.tag_id?getwelfareName(item.tag_id):item.name">{{item.tag_id?getwelfareName(item.tag_id):item.name}}</span>
									</div>
								</div>
								<div class="right">
									<div class="face-box">
										<img v-if="!baseInfo.image" src="images/face-add.png" alt="" class="cover">
										<img v-else  class="cover" :src="getUrl(baseInfo.image)" alt="" style="width:100%;border-radius: 50%;">
										<input type="file" name="" id="advar" @change="uploadAdvar($event)">
									</div>
									<span  @click="editBaseInfo" class="btn-edit" v-show="isShowView">编辑</span>
								</div>
							</div>
							<!--  -->
							<div v-if="inEditBaseInfo" class="form-box">
								<div class="form-list">
									<div class="item">
										<h3>姓名</h3>
										<input type="text" placeholder="请输入" class="input" v-model="baseInfo.name">
									</div>
									<div class="item item-right dateComponent">
										<h3>出生日期</h3>
										<!-- <input type="text" placeholder="请输入" class="input"> -->
										<!-- <input id="date-range3" type="text" placeholder="请输入" class="input input-date" size="40" value=""> -->
										<el-date-picker
											v-model="baseInfo.birthday"
											type="date"
											placeholder="选择日期"
											:clearable="false"
											format="yyyy-MM-dd"
											value-format="yyyy-MM-dd">
										  </el-date-picker>
										<i class="dateIcon"></i>
									</div>
									<div class="item w100">
										<h3>性别</h3>
										<div class="checkbox-group">
											<label :class="['checkbox',baseInfo['sex']==0?'on':'']" @click="baseInfo['sex'] = 0">女</label>
											<label :class="['checkbox',baseInfo['sex']==1?'on':'']" @click="baseInfo['sex'] = 1">男</label>
										</div>
									</div>
									<div class="item">
										<h3>电话</h3>
										<input v-model="baseInfo.telephone" type="text" placeholder="请输入" class="input">
									</div>
									<div class="item item-right">
										<h3>邮箱</h3>
										<input v-model="baseInfo.email" type="text" placeholder="请输入" class="input">
									</div>
									<div class="item">
										<h3>身份证号</h3>
										<input v-model="baseInfo.id_card" type="text" placeholder="请输入" class="input">
									</div>
									<div class="item item-right">
										<h3>所在地区</h3>
										<div class="select-group">
											<select name="" id="" class="input w110 mr10" v-model="baseInfo.province" @change="getSheng(baseInfo, $event)"> 
												<option :value="item.id" v-for="(item,index) in regions">{{item.name}}</option>
											</select>
											<select name="" id="" class="input w110 mr10" v-model="baseInfo.city" @change="getCity(baseInfo, $event)">
												<option :value="item.id" v-for="(item, index) in cityArr">{{item.name}}</option>
											</select>
											<select name="" id="" class="input w110" v-model="baseInfo.area" @change="getArea(baseInfo, $event)">
												<option :value="item.id" v-for="(item, index) in areaArr">{{item.name}}</option>
											</select>
										</div>
									</div>
									<div class="item item-right w100">
										<h3>语种<small>（选填）</small></h3>
										<div class="language-result">
											<span class="tag on" v-for="(item,index) in languageArr">{{item.language}} | {{item.ability}} <span href="" class="btn-close" @click="delLanguage(index)"></span>
										</div>
										<div class="language-choose-box" :style="{height: hidLaguage?'50px':''}">
											<div class="language-choose-item" v-for="(item,index) in prePareInfo.language" v-if="setHidden(index)">
												<span class="tag">{{item.name}}</span>
												<div class="language-choose-level-box">
													<span class="tag" @click="getLanguage(item,itemName)" v-for="(itemName,idx) in prePareInfo.ability">{{itemName.name}}</span>
												</div>
											</div>
											<span class="btn-more" v-if="hidLaguage" @click="hidLaguage=false">查看更多</span>
										</div>
									</div>
									<div class="item w100">
										<h3>个人标签<small>（选填）</small></h3>
										<div class="language-result" v-if="baseInfo.person_tag">
											<span class="tag on" v-for="(item,index) in baseInfo.person_tag">{{item.tag_id?getwelfareName(item.tag_id):item.name}} </span>
										</div>
										<input type="text" v-model="personTag" @keyup.enter="addPersonTag" placeholder="按回车键添加自定义标签" class="input">
									</div>
								</div>
								<div class="bottom-operate">
									<div class="right">
										<span href="javascript:void(0)" @click="inEditBaseInfo=false" class="btn btn-white">取消</span>
										<span href="" class="btn" @click="saveBaseInfo">保存</span>
									</div>
								</div>
							</div>
						</div>
						<div class="resume-box resume-box1">
							<div class="title-line">求职意向<a v-if="!inEditQzyx" @click="inEditQzyx=true" href="javascript:void(0)" class="btn-edit" v-show="isShowView">编辑</a></div>
							<ul class="list" v-if="!inEditQzyx" >
								<li class="w50">期望职位:{{resume_info.title}}</li>
								<li class="w50">工作性质：{{resume_info.natureName}}</li>
								<li class="w50">工作地点：
									<span v-for="(item, i) in resume_info.areaList" :key="i">{{item.name}}</span>
								</li>
								<li class="w50">工作状态：{{resume_info.statusName}}</li>
								<li class="w50">期望薪资：{{resume_info.salary_min}}K~{{resume_info.salary_max}}K</li>
								<li class="w50" v-if="resume_info.experience_config_id">工作经验：{{getExperience_config(resume_info.experience_config_id)}}年</li>
								<li class="w50" v-else>工作经验：</li>
							</ul>
							<div class="form-box" v-else>
								<div class="form-list">
									<div class="item">
										<h3>职位类别</h3>
										<input type="text" v-model="resumeInfo.position_name" placeholder="请选择,不可输入" class="input" @click="showPosition=true">
									</div>
									<div class="item item-right">
										<h3>职位名称</h3>
										<input v-model="resumeInfo.title" type="text" placeholder="请输入" class="input input-date">
									</div>
									<div class="item" style="height:129px;">
										<h3>工作性质</h3>
										<div class="checkbox-group">
											<label class="checkbox" @click="resumeInfo.nature_id = item.id" :class="{'on':resumeInfo.nature_id == item.id}" v-for="(item,index) in prePareInfo.nature">{{item.name}}</label>
										</div>
									</div>
									<div class="item item-right" style="height:129px;">
										<h3>工作状态</h3>
										<select name="" id="" class="input" v-model="resumeInfo.status_id">
											<option :value="item.id" v-for="(item,index) in prePareInfo.status">{{item.name}}</option>
										</select>
									</div>
									<div class="item">
										<h3>期望薪资</h3>
										<select style="display: inline-block;" name="" id="" class="input w50 mr10" v-model="resumeInfo.salary_id">
											<option :value="item.id" v-for="item in prePareInfo.salary">{{item.min}}~{{item.max}}K</option>
										</select>
										<!-- <div style="height:28px;"></div> -->
										<!-- <select style="display: inline-block;" name="" id="" class="input w50 mr10" v-model="resumeInfo.salary_max">
											<option :value="item" v-for="item in 50">{{item}}</option>
										</select>k -->
										<!-- <input type="text" placeholder="请输入" class="input" v-model="resumeInfo.salary_max"> -->
									</div>
									<div class="item item-right">
										<h3>工作地点</h3>
										<div class="select-group">
											<select name="" id="" class="input w110 mr10" v-model="resumeInfo.province" @change="getSheng(resumeInfo, $event)"> 
												<option :selected="item.id==resumeInfo.province" :value="item.id" v-for="(item,index) in regions">{{item.name}}</option>
											</select>
											<select name="" id="" class="input w110 mr10" v-model="resumeInfo.city" @change="getCity(resumeInfo, $event)">
												<option :value="item.id" :selected="item.id==resumeInfo.city" v-for="(item, index) in cityArr">{{item.name}}</option>
											</select>
											<select name="" id="" class="input w110" v-model="resumeInfo.area_id" @change="getArea(resumeInfo, $event)">
												<option :value="item.id" :selected="item.id==resumeInfo.area_id" v-for="(item, index) in areaArr">{{item.name}}</option>
											</select>
										</div>
									</div>
									<div class="item" style="height:129px;">
										<h3>工作经验</h3>
										<select name="" id="" class="input" v-model="resumeInfo.experience_config_id">
											<option v-for="(item,index) in prePareInfo.experience" :value="item.id">{{item.min}}~{{item.max}}年</option>
										</select>
									</div>
								</div>
								<div class="bottom-operate">
									<div class="right">
										<span class="btn btn-white" @click="inEditQzyx=false">取消</span>
										<span class="btn" @click="saveResumeInfo">保存</span>
									</div>
								</div>
							</div>
						</div>
						<div class="resume-box resume-box2">
							<div class="title-line">工作经验<a href="javascript:void(0)" class="btn-add" @click="addwork(1)" v-show="isShowView">添加</a></div>
							<div class="list-works">
								<div v-for="(item,index) in work_experience" :key="index">
									<div class="item" v-if="gzjyEditId!=item.id" >
										<div class="title-small"><span class="name">{{item.name}}</span><small>{{item.start}}～{{item.end}} ({{getAge(item.start,item.end)}}年)</small></div>
										<div class="sub-title"><span>{{item.position}}</span>|<span>{{item.salary}}</span></div>
										<div class="con" v-html="changeText(item.desc)"></div>
										<!-- <div class="tags">
											<span class="tag tag-gray">开朗</span>
											<span class="tag tag-gray">产品总监</span>
											<span class="tag tag-gray">喜欢看书</span>
										</div> -->
										<div class="operate" v-show="isShowView">
											<a href="javascript:void(0)" class="btn-delete" @click="delGzjy(item.id, index)">删除</a>
											<a href="javascript:void(0)" class="btn-edit" @click="addwork(item)">编辑</a>
										</div>
									</div>
									<div v-else class="form-box">
										<div class="form-list">
											<div class="item">
												<h3>公司名称</h3>
												<input type="text" placeholder="请输入" v-model="workExperience.name" class="input">
											</div>
											<div class="item item-right">
												<h3>所在行业</h3>
												<input type="text" placeholder="请选择,不可输入" class="input" v-model="workExperience.tradeName" @click="showTrade=true">
											</div>
											<div class="item">
												<h3>职位</h3>
												<input type="text" placeholder="请输入" class="input" v-model="workExperience.position">
											</div>
											<div class="item item-right">
												<h3>薪资<small>（选填）</small></h3>
												<input type="text" placeholder="请输入" class="input" v-model="workExperience.salary">
											</div>
											<div class="item dateComponent">
												<h3>在职时间</h3>
												<!-- <input type="text" placeholder="请输入" class="input"> -->
												<input id="date-range1" type="text" placeholder="请输入" class="input input-date" size="40" :value="workExperience.start+' to '+workExperience.end">
											</div>
											<div class="item w100">
												<h3>工作描述</h3>
												<textarea class="textarea" name="" placeholder="请输入" id="" cols="30" rows="10" v-model="workExperience.desc"></textarea>
											</div>
										</div>
										<div class="bottom-operate">
											<div class="right">
												<span @click="gzjyEditId=-1" class="btn btn-white">取消</span>
												<span class="btn" @click="saveWorkExperience(1)">保存</span>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div v-if="gzjyEditId==''" class="form-box">
								<div class="form-list">
									<div class="item">
										<h3>公司名称</h3>
										<input type="text" placeholder="请输入" v-model="workExperience.name" class="input">
									</div>
									<div class="item item-right">
										<h3>所在行业</h3>
										<input type="text" placeholder="请选择,切不可输入" class="input" v-model="workExperience.trade_name" @click="showTrade=true">
									</div>
									<div class="item">
										<h3>职位</h3>
										<input type="text" placeholder="请输入" class="input" v-model="workExperience.position">
									</div>
									<div class="item item-right">
										<h3>薪资<small>（选填）</small></h3>
										<input type="text" placeholder="请输入" class="input" v-model="workExperience.salary">
									</div>
									<div class="item dateComponent">
										<h3>在职时间</h3>
										<!-- <input type="text" placeholder="请输入" class="input"> -->
										<input id="date-range1" type="text" placeholder="请输入" class="input input-date" size="40" value="">
									</div>
									<div class="item w100">
										<h3>工作描述</h3>
										<textarea class="textarea" name="" placeholder="请输入" id="" cols="30" rows="10" v-model="workExperience.desc"></textarea>
									</div>
								</div>
								<div class="bottom-operate">
									<div class="right">
										<span @click="gzjyEditId=-1" class="btn btn-white">取消</span>
										<span class="btn" @click="saveWorkExperience">保存</span>
									</div>
								</div>
							</div>
						</div>

						<div class="resume-box resume-box3">
							<div class="title-line">教育经历<a href="javascript:void(0)" @click="addEduEx()" class="btn-add" v-show="isShowView">添加</a></div>
							<div class="list-teach">
								<div v-for="(item,index) in education_experience" :key="index">
									<div class="item" v-if="jyjlEditId!=item.id">
										<div class="title-small"><span class="name">{{item.name}}</span><small>{{item.start}}～{{item.end}} ({{getAge(item.start,item.end)}}年)</small></div>
										<div class="sub-title"><span>{{item.major}}</span>|<span>本科</span></div>
										<div class="con" v-html="changeText(item.desc)"></div>
										<div class="operate" v-show="isShowView">
											<a href="javascript:void(0)" @click="delJyjy(item.id, index)" class="btn-delete">删除</a>
											<a href="javascript:void(0)" @click="addEduEx(item,index)" class="btn-edit">编辑</a>
										</div>
									</div>
									<div v-else="" class="form-box">
										<img class="emotion" src="" alt="">
										<div class="form-list">
											<div class="item">
												<h3>学校名称</h3>
												<input type="text" placeholder="请输入" v-model="educationExperience.name" class="input">
											</div>
											<div class="item item-right">
												<h3>学历</h3>
												<select name="" id="" class="input" v-model="educationExperience.education_id">
													<option :value="item.id" v-for="(item,index) in prePareInfo.education">{{item.name}}</option>
												</select>
											</div>
											<div class="item">
												<h3>专业<small>（选填）</small></h3>
												<input v-model="educationExperience.major" type="text" placeholder="请输入" class="input">
											</div>
											<div class="item item-right">
												<h3>在读时间</h3>
												<input readonly id="date-range0" type="text" placeholder="请输入" class="input input-date" size="40" :value="item.start+' to '+item.end">
											</div>
											<div class="item w100">
												<h3>专业描述<small>（选填）</small></h3>
												<textarea v-model="educationExperience.desc" class="textarea" name="" placeholder="请输入" id="" cols="30" rows="10"></textarea>
												<script style="width:792px !important;height:80px;z-index:10;background:red;" type="text/plain" id="myEditor" ></script>
											</div>
										</div>
										<div class="bottom-operate">
											<div class="right">
												<span @click="jyjlEditId=-1" class="btn btn-white">取消</span>
												<span class="btn" @click="saveEducationExperience(1)">保存</span>
											</div>
										</div>
									</div>
								</div>
								
							</div>
							<div v-if="jyjlEditId==''" class="form-box">
								<div class="form-list">
									<div class="item">
										<h3>学校名称</h3>
										<input type="text" placeholder="请输入" v-model="educationExperience.name" class="input">
									</div>
									<div class="item item-right">
										<h3>学历</h3>
										<select name="" id="" class="input" v-model="educationExperience.education_id">
											<option :value="item.id" v-for="(item,index) in prePareInfo.education">{{item.name}}</option>
										</select>
									</div>
									<div class="item">
										<h3>专业<small>（选填）</small></h3>
										<input v-model="educationExperience.major" type="text" placeholder="请输入" class="input">
									</div>
									<div class="item item-right">
										<h3>在读时间</h3>
										<input id="date-range0" type="text" placeholder="请输入" class="input input-date" size="40" value="">
									</div>
									<div class="item w100">
										<h3>专业描述<small>（选填）</small></h3>
										<script style="width:792px !important;height:80px;z-index:10;background:red;" type="text/plain" id="myEditor" ></script>
										<textarea v-model="educationExperience.desc" class="textarea" name="" placeholder="请输入" id="" cols="30" rows="10"></textarea>
									</div>
								</div>
								<div class="bottom-operate">
									<div class="right">
										<span @click="jyjlEditId=-1" class="btn btn-white">取消</span>
										<span class="btn" @click="saveEducationExperience">保存</span>
									</div>
								</div>
							</div>
						</div>
						<div class="resume-box resume-box4">
							<div class="title-line">学历认证
								<a href="javascript:void(0)" @click="xlrzEditName=''" class="btn-add" v-show="isShowView">添加</a>
								<!-- <a href="" class="btn-edit">编辑</a> -->
							</div>
							<div class="list-card">
								<div v-for="(item, i) in education_certificate" :key="i">
									<div class="item" v-if="xlrzEditName!=item">
										<div class="img-box">
											<div class="img"><img :src="getUrl(item)" alt="" class="cover"></div>
										</div>
										<div class="operate" v-show="isShowView">
											<a href="javascript:void(0)" @click="education_certificate.splice(i, 1);saveXlrz()" class="btn-delete">删除</a>
											<!-- <a href="javascript:void(0)" @click="xlrzEditName=item" class="btn-edit">编辑</a> -->
										</div>
									</div>

									<div class="item no-hover" v-else>
										<div class="edit-upload">
											<div class="upload-item btn-upload">
												<img :src="getUrl(item)" alt="" class="img cover">
												<input type="file" name="" id="">
											</div>
										</div>
										<div class="bottom-operate">
											<div class="right">
												<a href="javascript:void(0)" @click="xlrzEditName=-1" class="btn btn-white">取消</a>
												<a href="javascript:void(0)" @click="saveXlrz" class="btn">保存</a>
											</div>
										</div>
									</div>
								</div>
								<div class="item no-hover" v-if="xlrzEditName==''">
									<div class="edit-upload">
										<div class="upload-item btn-upload">
											<!-- <img :src="getUrl(item)" alt="" class="img cover"> -->
											<input type="file" name="" @change="uploadOImg($event, 2, -1)" id="">
										</div>
									</div>
									<div class="bottom-operate">
										<div class="right">
											<a href="javascript:void(0)" @click="xlrzEditName=-1" class="btn btn-white">取消</a>
											<a href="javascript:void(0)" @click="saveXlrz" class="btn">保存</a>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="resume-box resume-box5">
							<div class="title-line">个人作品<a v-if="!inEditGrzp" @click="operson_works=JSON.stringify(person_works);inEditGrzp=true" href="javascript:void(0)" class="btn-edit" v-show="isShowView">编辑</a></div>
							<div class="list-product">
								<div class="item" v-if="!inEditGrzp">
									<div class="img-box-more">
										<div v-for="(item, i) in person_works" :key="i" class="img"><img :src="getUrl(item)" alt="" class="cover"></div>
									</div>
								</div>
								<div v-else class="item no-hover">
									<div class="edit-upload-product">
										<div class="upload-item" v-for="(item, i) in person_works" :key="i">
											<img :src="getUrl(item)" alt="" class="img cover">
											<a href="javascript:void(0)" @click="person_works.splice(i, 1)" class="btn-close"></a>
										</div>
										<div class="upload-item btn-upload" v-if="person_works.length<5">
											<span class="txt">上传图片({{person_works.length}}/5)</span>
											<input type="file" name="" @change="uploadOImg($event, 1)" id="">
										</div>
									</div>
									<div class="bottom-operate">
										<div class="right">
											<a href="javascript:void(0)" @click="person_works=JSON.parse(operson_works);inEditGrzp=false" class="btn btn-white">取消</a>
											<a href="javascript:void(0)" @click="saveGrzp" class="btn">保存</a>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="resume-box resume-box6">
							<div class="title-line">自我评价<a v-if="!inEditZwpj" href="javascript:void(0)" @click="inEditZwpj=true" class="btn-edit" v-show="isShowView">编辑</a></div>
							<div class="list-info" v-if="!inEditZwpj">
								<div class="item">
									<div class="con" v-html="personDescInfo||''">
										
									</div>
								</div>
							</div>
							<div class="form-box" v-else>
								<div class="form-list">
									<div class="item w100">
										<textarea v-model="personDesc" class="textarea" name="" placeholder="请输入" id="" cols="30" rows="10"></textarea>
									</div>
								</div>
								<div class="bottom-operate">
									<div class="right">
										<span @click="inEditZwpj=false" class="btn btn-white">取消</span>
										<span class="btn" @click="saveDesc">保存</span>
									</div>
								</div>
							</div>
						</div>
					</section>
		
				</div>
				<div class="main-right">
		
					<div class="g-sideInfo">
						<h3>简历类型</h3>
						<div class="hd">
							<a :class="{'on':setLanguage==0}" @click="setLanguage=0">中文版</a>
							<a :class="{'on':setLanguage==1}" @click="setLanguage=1">英文版</a>
						</div>
						<h3>隐私设置 <a href="javascript:void(0)" @click="dialogTableVisible=true" class="blue">设置</a></h3>
						<div class="con">
							<div class="item">
								简历设置 <span class="r on">{{ycsz? "已隐藏" : "开放"}}</span>
							</div>
						</div>
					</div>
		
					<div class="g-sidePercent">
						<h3>简历完成度<small>（{{complete}}%）</small></h3>
						<div class="percent">
							<i class="per" :style="complete? 'width: '+ complete +'%;' : 'width: 0%;'"></i>
						</div>
					</div>
		
				</div>
			</div>
		</section>
		
		<!-- 选择行业 -->
		<div class="alert alert-chooseProfession show" v-if="showTrade">
			<div class="over-close" @click="showTrade=false"></div>
			<div class="box">
				<div class="title">选择行业 <a class="btn-close" @click="showTrade=false"></a></div>
				<ul class="classify-title scroll">
					<li v-for="(item,index) in prePareInfo.trade" :class="{'on':trade.id==item.id}" @click="trade=item"><a>{{item.name}}</a></li>
				</ul>
				<div class="classify-detail">
					<div class="bd-con bd-con1">
						<ul class="list">
							<li v-for="(itemName,idx) in trade.children"><a @click="getTrade(itemName)">{{itemName.name}}</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<!-- 选择职类 -->
		<div class="alert alert-chooseJobs show" v-if="showPosition">
			<div class="over-close" @click="showTrade=false"></div>
			<div class="box">
				<div class="title">请选择职类 <div class="search-box"><input @input="serPositionHandle" type="text" class="input" placeholder="请输入关键词" v-model="searchPosition"></div> <span @click="showPosition=false" class="btn-close"></span @click="showPosition=false"></div>
				<ul class="classify-title scroll">
					<li v-if=" prePareInfo.position.length" v-for="(item,index) in prePareInfo.position" :class="{'on':level1.id==item.id}" @click="setLevel1(item)"><span>{{item.name}}</span></li>
				</ul>
				<div class="classify-detail">
					<div class="bd-con bd-con1" v-if=" prePareInfo.position.length">
						<div class="sub-hd">
							<div class="item" v-for="(itemName,idx) in level1.children" :class="{'on':level2.id==itemName.id}" @click="setLevel2(itemName)"><a>{{itemName.name}}</a></div>
						</div>
						<div class="sub-bd">
							<div class="sub-bd-con sub-bd-con1" :class="{'on':level2.children}">
								<ul class="list">
									<li v-for="(itemName1,idx1) in level2.children"><a @click="getPosition(itemName1)">{{itemName1.name}}</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<el-dialog title="隐私设置" width="400px" :visible.sync="dialogTableVisible">
			<div>
				隐藏简历中手机号：<el-switch
					v-model="ycsz">
				</el-switch>
			</div>
			<span slot="footer" class="dialog-footer">
				<el-button @click="dialogTableVisible = false">取 消</el-button>
				<el-button type="primary" @click="ysszSave">确 定</el-button>
			  </span>
		</el-dialog>

		<footer id="footer"></footer>
	</div>
<script src="js/jquery.min.js"></script>
<script src="js/slide.min.js"></script>
<script src="js/polyfill.min.js"></script>
<script src="js/jquery.nicescroll3.7.6.min.js"></script>
<!-- <script src="js/main.js"></script> -->
<script src="js/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/request.js"></script>
<script src="js/lcommon.js"></script>
<script>
	$(function(){
		$("header .menu li").eq(0).addClass('on')
	})
</script>
<script>
	// $(function(){
	// 	$("body").on('click', '.alert-chooseProfession .classify-title li,.alert-chooseJobs .classify-title li', function(event) {
	// 		event.preventDefault();
	// 		if (!$(this).hasClass('on')) {
	// 			$(this).addClass('on').siblings().removeClass('on')
	// 			$(this).parent().siblings('.classify-detail').find('.bd-con').css("display","none").eq($(this).index()).css("display","block");
	// 		}
	// 	});
	// 	$("body").on('click', '.alert-chooseJobs .sub-hd .item', function(event) {
	// 		event.preventDefault();
	// 		console.log(333)
	// 		if ($(this).hasClass('on')) {
	// 			$(this).removeClass('on')
	// 			$(this).parent().next('.sub-bd').find('.sub-bd-con').css("display","none");
	// 		}else{
	// 			$(this).addClass('on').siblings().removeClass('on')
	// 			$(this).parent().next('.sub-bd').find('.sub-bd-con').css("display","none").eq($(this).index()).css("display","block");
	// 		}
	// 		$(".scroll").niceScroll({cursorcolor:"#eee",cursorwidth:"8px",cursorborder:""});
	// 	});

	// })

</script>
<script src="https://unpkg.com/qiniu-js@2.4.0/dist/qiniu.min.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/jquery.daterangepicker.min.js"></script>

<script>
	$(function(){
		$("#header").load("./lcommon/header.html"); 
		$("#footer").load("./lcommon/footer.html"); 
		if (!window['console']){
			window.console = {};
			window.console.log = function(){};
		}
		$.dateRangePickerLanguages['custom'] =
		{
			'selected': 'Choosed:',
			'days': 'Days',
			'apply': 'Close',
			'week-1' : 'Mon',
			'week-2' : 'Tue',
			'week-3' : 'Wed',
			'week-4' : 'Thu',
			'week-5' : 'Fri',
			'week-6' : 'Sat',
			'week-7' : 'Sun',
			'month-name': ['January','February','March','April','May','June','July','August','September','October','November','December'],
			'shortcuts' : 'Shortcuts',
			'past': 'Past',
			'7days' : '7days',
			'14days' : '14days',
			'30days' : '30days',
			'previous' : 'Previous',
			'prev-week' : 'Week',
			'prev-month' : 'Month',
			'prev-quarter' : 'Quarter',
			'prev-year' : 'Year',
			'less-than' : 'Date range should longer than %d days',
			'more-than' : 'Date range should less than %d days',
			'default-more' : 'Please select a date range longer than %d days',
			'default-less' : 'Please select a date range less than %d days',
			'default-range' : 'Please select a date range between %d and %d days',
			'default-default': 'This is costom language'
		};
	});

	function bindJyjlEvt(){
		// 选中教育经历
		$('#date-range0').dateRangePicker({})
		.bind('datepicker-apply',function(event,obj){
			console.log('apply',obj);
			console.log(moment(obj.date1).format("YYYY-MM-DD"))
			console.log(moment(obj.date2).format("YYYY-MM-DD"))
			_vm.educationExperience.start = moment(obj.date1).format("YYYY-MM-DD")
			_vm.educationExperience.end = moment(obj.date2).format("YYYY-MM-DD")
		})
	}
	function bindGzjlEvt(){
		//选中工作经历
		$('#date-range1').dateRangePicker({})
		.bind('datepicker-first-date-selected', function(event, obj){
			// console.log('first-date-selected',obj);
		})
		.bind('datepicker-change',function(event,obj){
			// console.log('change',obj);
		})
		.bind('datepicker-apply',function(event,obj){
			console.log('apply',obj);
			console.log(moment(obj.date1).format("YYYY-MM-DD"))
			_vm.workExperience.start = moment(obj.date1).format("YYYY-MM-DD")
			_vm.workExperience.end = moment(obj.date2).format("YYYY-MM-DD")
		})
		.bind('datepicker-close',function(){
			// console.log('before close');
		})
		.bind('datepicker-closed',function(){
			// console.log('after close');
		})
		.bind('datepicker-open',function(){
			// console.log('before open');
		})
		.bind('datepicker-opened',function(){
			// console.log('after open');
		});
	}
</script>
<script>
	var _vm = new Vue({
		el:"#app",
		data:{
			hidLaguage:true,
			loading:true,
			isShowView:true, //是否预览简历
			qiniuUrl:'http://changhai-img.weihankeji.com/', //七牛云外链显示
			qiniuImg:'',
			prePareInfo:{
				position:''
			}, //所有通用数据
			regions:[],  //省市区
			cityArr:[],
			areaArr:[],
			level1:'',
			level2:'',
			trade:'', //选中的行业
			setLanguage:0, //0为中文 1为英文
			languageArr:[],
			personTag:"",
			editArr:{
				baseInfo_edit:false,
				person_desc:false,
				work_experience:false
			},
			person_info:'', //个人信息
			baseInfo:{  //编辑的个人信息
				image:'',
				name:'',
				birthday:'',
				sex:-1,
				telephone:"",
				email:'',
				id_card:"",
				person_tag:[],
				province:'',
				city:'',
				area:'',
			},
			personDesc:'', //编辑的自我介绍
			personDescInfo: "",
			person_desc:'', //自我介绍
			resume_info:'',//求职意向
			resumeInfo:{ //编辑的求职意向
				position_id:'',
				position_name:'',
				title:'',
				nature_id:"",
				// salary_min:'',
				// salary_max:"",
				status_id:"",
				area_id:"",
				province:'',
				city:'',
				experience_config_id:"",
				salary_id:''
			 },
			work_experience:'',
			workExperience:{ //编辑的工作经历
				id:"", //为空为新增 有值为修改 默认为新增
				position:'' ,
				trade_id:'',
				trade_name:'',
				name:'',
				start:'',
				end:'',
				desc:'',
				salary:""
			}, 
			educationExperience:{ //编辑的教育经历
				id:'', //教育经历id	为空为新增 有值为修改 默认为空
				education_id:'',
				name:'',
				start:'',
				end:'',
				desc:'',
				major:""
			},
			showPosition:false,
			showTrade:false,
			inEditBaseInfo: false, //编辑基本信息
			inEditQzyx: false, //编辑求职意向
			inEditZwpj: false,//自我评价
			inEditGrzp: false,//个人作品
			person_works: [],
			operson_works: [],
			xlrzEditName: -1,//学历认证
			education_certificate: [],
			gzjyEditId: -1,//工作经验
			education_experience: [],//教育经历
			jyjlEditId: -1,
			complete: 0,
			dialogTableVisible: false,
			ycsz: true,
			jyjlEditIndex:-1,
			searchPosition:''
		},
		watch:{
			setLanguage(val){
				var that = this
				request('person/resume/language','PUT',JSON.stringify({language:val}),function(res){
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			}
		},
		computed: {
			getBase(){
				var info = ''
				if(this.person_info.sex==0 ||this.person_info.sex==1){
					info=this.person_info.sex==1?'男':'女'
				}
				if(this.person_info.birthday){
					info = info+' | '
					info += this.getAge(this.person_info.birthday)+'岁'
				}
				if(this.person_info.areaList){
					info = info+' | '
					info = info+this.showArea(this.person_info.areaList)
				}
				console.log(info)
				return info
			},
			
		},
		mounted:function(){
			var that = this
			indexprepare(function(data){
				that.prePareInfo = data
				that.regions = data.region
				that.getBaseInfo()
			}, 1)
			
			// this.gerPrepare()
		},
		methods: {
			setHidden(index){
				if(this.hidLaguage){
					if(index<7){
						return true
					}else{
						return false
					}
				}else{
					return true
				}
			},
			getwelfareName(id){
				// alert(getWelfareName(id))
					return getWelfareName(id)
				
			},
			changeView(){
				this.isShowView = !this.isShowView
			},
			//获取个人信息
			getBaseInfo:function(){
				var that = this
				request('person/resume/base_info','get',{},function(res){
					_vm.loading = false
					that.complete = res.data.complete
					that.person_info = res.data.person_info
					that.person_info.areaList = getAreaName(that.person_info.area_id).reverse()
					if(that.person_info.areaList&&that.person_info.areaList.length>2){
						that.person_info.province = that.person_info.areaList[0].id
						that.person_info.city = that.person_info.areaList[1].id
					}
					that.personDesc = res.data.person_desc
					if(that.personDesc){
						that.personDescInfo = that.personDesc.replace(/\n/g, "<br>")
					}
					
					that.languageArr = []
					if(that.person_info.language){
						that.person_info.language.forEach(function(v){
							v.languageName = getLanguageName(v.language_id)
							v.abilityName = getAbilityName(v.ability_id)
							that.languageArr.push(
								{
									language_id: v.language_id,
									language: v.languageName,
									ability_id: v.ability_id,
									ability: v.abilityName
								}
							)
						})
					}
					

					that.ycsz = res.data.resume_type.hidden==1//隐私设置
					that.baseInfo = res.data.person_info
					that.baseInfo.area = res.data.person_info.area_id
					that.person_desc = res.data.person_desc

					var resume_info = res.data.resume_info
					resume_info.natureName = getNatureName(resume_info.nature_id) 
					
					resume_info.areaList = getAreaName(resume_info.area_id).reverse()
					resume_info.position_name = getPositionName(resume_info.position_id) 
					resume_info.statusName = getResumeStatusListName(that.resumeInfo.status_id)
					
					// resume_info.areaName = getAreaName(resume_info.area_id) 
					
					// resume_info.statusName = status_id
					that.resume_info = res.data.resume_info
					that.resumeInfo = res.data.resume_info
					that.resumeInfo.salary_id = getsalaryId(that.resumeInfo.min,that.resumeInfo.max)
					console.log(that.resumeInfo.salary_id)
					if(resume_info.areaList&&resume_info.areaList.length>2){
						that.resumeInfo.province = resume_info.areaList[0].id
						that.resumeInfo.city = resume_info.areaList[1].id
					}
					
					that.getSheng(that.resumeInfo)
					that.getCity(that.resumeInfo)
					that.getArea(that.resumeInfo)
					if(res.data.work_experience.length){
						res.data.work_experience.forEach(v => {
							v.tradeName = getTradeName(v.trade_id)
						});
					}
					that.work_experience = res.data.work_experience
					that.person_works = res.data.person_works
					that.education_experience = res.data.education_experience
					that.education_certificate = res.data.education_certificate
				},function(err){
					_vm.loading = false
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			getSheng:function(data, e){
				var that = this
				if(e){
					data.province = e.currentTarget.value
				}
				var regions = this.regions
				var cityArr = regions.filter(function(item){
					if(item.id == data.province){
						return item
					}
				})
				
				this.cityArr = cityArr[0]? cityArr[0].children : []
			},
			getCity:function(data, e){
				if(e){
					data.city = e.currentTarget.value
				}
				var that = this
				var areaArr = this.cityArr.filter(function(item){
					if(item.id == data.city){
						return item
					}
				})
				this.areaArr = areaArr[0]? areaArr[0].children : []
			},
			getArea(){
				
			},
			//添加语言
			getLanguage(language,ability){
				if(this.languageArr.length>=3){
					this.$message({
						message: "最多只能添加3个语种",
						type: 'error',
						// duration: 0
					});
					return false
				}
				if(!this.languageArr.length){
					this.languageArr.push(
						{
							language_id:language.id,
							language:language.name,
							ability_id:ability.id,
							ability:ability.name
						}
					)
				}else{
					var flag = this.languageArr.findIndex(function(item){
						return item.language_id == language.id
					})
					console.log(flag)
					if(flag != -1){
						this.languageArr.splice(flag, 1, {
							language_id:language.id,
							language:language.name,
							ability_id:ability.id,
							ability:ability.name
						})
					}else{
						this.languageArr.push(
							{
								language_id:language.id,
								language:language.name,
								ability_id:ability.id,
								ability:ability.name
							}
						)
					}
				}
			},
			delLanguage(index){
				this.languageArr.splice(index, 1)
			},

			//添加个人标签
			addPersonTag(){
				var that = this
				if(!this.personTag){
					return 
				}
				request('person/resume/tag','POST',JSON.stringify({name:this.personTag}),function(res){
					that.personTag = ''
					// res.data.tag[0].tag_id = res.data.tag[0].id
					that.baseInfo.person_tag.push(res.data.tag[0])
					
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
				

			},
			//保存个人信息
			saveBaseInfo(){
				if(!checkEmail(this.baseInfo.email)){
					this.$message({
						message: "请填写正确的邮箱格式",
						type: 'error',
						// duration: 0
					});
					return 
				}
				var language = this.languageArr.map(function(item){
					var data = item
					return {
						language_id: data.language_id, 
						ability_id: data.ability_id
					}
				})
				var that = this,params={
					image:this.delImg(this.baseInfo.image),
					name:this.baseInfo.name,
					telephone:this.baseInfo.telephone,
					sex:this.baseInfo.sex,
					birthday:this.baseInfo.birthday,
					area_id:this.baseInfo.area,
					id_card:this.baseInfo.id_card,
					email:this.baseInfo.email,
					language:language,
					tag:this.baseInfo.person_tag.map(function(item){
						return item.id
					})
				}
				
				request('person/resume/base_info','PUT',JSON.stringify(params),function(res){
					that.inEditBaseInfo = false
					indexprepare(function(data){
						that.prePareInfo = data
						that.regions = data.region
						that.getBaseInfo()
					}, 1)
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			//保存自我介绍
			saveDesc(){
				var that = this
				request('person/resume/self_evaluate','PUT',JSON.stringify({desc:this.personDesc}),function(res){
					that.inEditZwpj = false
					that.getBaseInfo()
					that.person_desc = ''
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			setLevel1(item){
				this.level1=item
			},
			setLevel2(item){
				this.level2=item
			},
			getPosition(item){
				this.resumeInfo.position_id = item.id
				this.resumeInfo.position_name = item.name
				this.showPosition = false
			},
			//保存求职意向
			saveResumeInfo(){
				var that = this,params={
					position_id:this.resumeInfo.position_id,
					nature_id:this.resumeInfo.nature_id,
					title:this.resumeInfo.title,
					salary_min:getsalaryName(this.resumeInfo.salary_id).min,
					salary_max:getsalaryName(this.resumeInfo.salary_id).max,
					status_id:this.resumeInfo.status_id,
					area_id:this.resumeInfo.area_id,
					experience_config_id:this.resumeInfo.experience_config_id
				}
				request('person/resume/job_intention','PUT',JSON.stringify(params),function(res){
					that.inEditQzyx = false
					that.getBaseInfo()
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			getTrade(item){
				this.workExperience.trade_name = item.name
				this.workExperience.trade_id = item.id
				this.showTrade = false
			},
			addwork(item){
				// this.workExperience={ //编辑的工作经历
				// 	id:"", //为空为新增 有值为修改 默认为新增
				// 	position:'' ,
				// 	trade_id:'',
				// 	trade_name:'',
				// 	name:'',
				// 	start:'',
				// 	end:'',
				// 	desc:'',
				// 	salary:""
				// }
				// this.editArr.work_experience = true

				if(item == 1){
					this.workExperience = {
						id:"", //为空为新增 有值为修改 默认为新增
						position:'' ,
						trade_id:'',
						trade_name:'',
						name:'',
						start:'',
						end:'',
						desc:'',
						salary:""
					};
					this.gzjyEditId = ''
				} else {
					this.workExperience = item;
					this.gzjyEditId = item.id
				}
				
				setTimeout(function(){
					bindGzjlEvt()
				}, 200)
			},
			//新增工作经历
			saveWorkExperience(num){
				var that = this,params={
					// id:this.gzjyEditId,
					position:this.workExperience.position,
					trade_id:this.workExperience.trade_id,
					name:this.workExperience.name,
					start:this.workExperience.start,
					end:this.workExperience.end,
					desc:this.workExperience.desc,
					salary:this.workExperience.salary
				}
				if(num==1){
					var url='person/resume/work_experience/'+this.gzjyEditId
				}else{
					var url='person/resume/work_experience'
				}
				request(url,'PUT',JSON.stringify(params),function(res){
					that.gzjyEditId = -1
					that.getBaseInfo()
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			//保存教育经历
			addEduEx(item,index){
				if(item){
					this.educationExperience = item
					this.jyjlEditId = item.id
					this.jyjlEditIndex = index
				} else {
					this.educationExperience = { //编辑的教育经历
						id:'', //教育经历id	为空为新增 有值为修改 默认为空
						education_id:'',
						name:'',
						start:'',
						end:'',
						desc:'',
						major:""
					}
					this.jyjlEditId = ''
					this.jyjlEditIndex = -1
				}
				setTimeout(function(){
					bindJyjlEvt()
				}, 200)
			},
			saveEducationExperience(num){
				var that = this,params={
					// id:this.educationExperience.id,
					education_id:this.educationExperience.education_id,
					name:this.educationExperience.name,
					start:this.educationExperience.start,
					end:this.educationExperience.end,
					desc:this.educationExperience.desc,
					// desc:um.getContent(),
					major:this.educationExperience.major
				}
				if(num==1){
					var url = 'person/resume/education_experience/'+this.educationExperience.id
				}else{
					var url = 'person/resume/education_experience'
				}
				request(url,'PUT',JSON.stringify(params),function(res){
					that.jyjlEditId = -1
					that.getBaseInfo()
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			uploadAdvar(e){
				var that = this
				const file = e.target.files[0]; // Blob，文件流对象
				this.upLoadImg(file,function(res){
					that.baseInfo.image = res.key
				})
			},
			upLoadImg(file,func){
				request('common/qiniu/token','GET',{},function(res){
					var token = res.data.token,that=this
					const formData = new FormData();
					formData.append('token', token);
					formData.append('file', file);
					console.log(file)
					console.log(formData)
					$.ajax(
						{
							type: 'POST',
							url: 'https://upload-z2.qiniup.com',
							contentType: false,
							data: formData,
							processData: false,
							async :false,//设置格式为同步非异步 不然可能会报错无法存储到临时变量/对象
							dataType:'json',
							success: function (r) {
								func && func(r)
								
							},
							error: function (r) {
								console.log(r);
							}
						});
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
						// duration: 0
					});
				})
			},
			edit(){

			},
			uploadOImg(e, type){
				var that = this
				const file = e.target.files[0]; // Blob，文件流对象
				this.upLoadImg(file,function(res){
					// that.baseInfo.image = that.qiniuUrl+res.key
					if(type==1){
						that.person_works.push(res.key)
					} else {
						that.xlrzEditName = res.key
						that.education_certificate.push(res.key)
					}
				})
			},
			//保存个人作品
			saveGrzp(){
				var that = this,person_works = this.person_works
				person_works = person_works.map(function(item){
					return that.delImg(item)
				})
				var params={
					image: person_works
				}
				request('person/resume/personal_works','PUT',JSON.stringify(params),function(res){
					that.inEditGrzp = false
					that.getBaseInfo()
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
					});
				})
			},
			//保存学历认证
			saveXlrz(){
				var that = this,education_certificate=this.education_certificate
				education_certificate = education_certificate.map(function(item){
					return that.delImg(item)
				})
				var params={
					image: education_certificate
				}
				request('person/resume/education_certificate','PUT',JSON.stringify(params),function(res){
					that.xlrzEditName = -1
					that.getBaseInfo()
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
					});
				})
			},
			//删除教育经历
			delJyjy(id, i){
				var that = this,params={
					
				}
				request('person/resume/education_experience/'+ id,'DELETE',JSON.stringify(params),function(res){
					that.education_experience.splice(i, 1)
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
					});
				})
			},
			//删除工作经历
			delGzjy(id, i){
				var that = this,params={
					
				}
				request('person/resume/work_experience/'+ id,'DELETE',JSON.stringify(params),function(res){
					that.work_experience.splice(i, 1)
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
					});
				})
			},
			editBaseInfo(){
				this.getSheng(this.person_info)
				this.getCity(this.person_info)
				this.getArea(this.person_info)
				this.inEditBaseInfo = true
			},
			ysszSave(){
				var that = this,params={
					hidden: this.ycsz? 1 : 0
				}
				request('person/resume/hidden','PUT',JSON.stringify(params),function(res){
					that.dialogTableVisible = false
					that.$message.success(res.message)
				},function(err){
					that.$message({
						message: err.responseJSON.message,
						type: 'error',
					});
				})
			},
			//匹配img路径
			getUrl(imgUrl){
				var img = imgUrl
				if(img.indexOf(this.qiniuUrl)==-1){
					return this.qiniuUrl+img
				}else{
					return img
				}
			},
			delImg(img){
				if(img.indexOf(this.qiniuUrl)==-1){
					return img
				}else{
					return img.substr(this.qiniuUrl.length)
				}
			},
			getExperience_config(id){
				if(!id){
					return ""
				}
				var data = getExperienceName(id,this.prePareInfo.experience)
				if(!data){
					return ""
				}else{
					return `${data.min} ~ ${data.max}`
				}
				
			},
			
			//获取时间差
			getAge(birth="",end=""){
				var a = birth?moment(birth):moment();
				var b = end?moment(end):moment();
				return Math.abs(b.diff(a, 'years'))
			},
			showArea(list){
				var area = ""
				if(list&&list.length){
					list.forEach(function(item){
						area += item.name
					})
				}
				
				return area
			},
			changeText(data){
				if(data){
					return data.replace(/\n/g, "<br>")
				}else{
					return data
				}
				
			},
			
			//搜索职位
			serPositionHandle(){
				// searchPosition
				if(!this.searchPosition){
					this.prePareInfo.position = positionList
					return
				}
				var data = searchPositionName(this.searchPosition)
				this.level1 = ''
				this.level2 = ''
				console.log(data.slice(-1))
				this.prePareInfo.position = data.slice(-1)
			}
			

		},
	})
</script>
</body>
</html>